﻿using System.Data;

namespace Max.PH6_2009A.LowCode.IService
{
    public interface IBaseService<T> where T : class,new()
    {
        #region 使用的泛型操作

        int Insert(T t);
        int Update(T t);
        int Delete(List<T> t);
        int Insert(List<T> t);
        IEnumerable<T> Select();
        IEnumerable<T> Select(object param);

        #endregion

        #region Sql语句操作

        int Insert(string sql,object param,IDbTransaction tran=null);
        int Update(string sql,object param, IDbTransaction tran = null);
        int Delete(string sql,object param, IDbTransaction tran = null);
        IEnumerable<T> Select(string sql,object param);
        IEnumerable<T> Select(string sql, object param,CommandType commandType);

        #endregion

    }
}